home *** CD-ROM | disk | FTP | other *** search
- Jeffrey Richter's Spin Button
- adapted and posted by Costas Kitsos with Mr. Richter's permission
-
- Jeffrey Richter's "Windows 3: A Developer's Guide" is one of the best books on
- Windows programming I have come across. Ever since I bought it, it has been
- a constant source of information, inspiration and a breath of fresh air in the
- mind boggling world of Windows Programming. Mr. Richter's book is packed with
- programming examples, EXEs, DLLs, discussions and explanations on some of the
- most intricate aspects of taming Windows Programming.
-
- One of the gems in the book is Mr. Richter's Spin Button Control. A Spin
- Button Control is familiar to most Windows users. It's the little control
- with the Up/Down arrows one finds in Apps like the Control Panel's Color
- setting Dialog. Mr. Richter's Spin Button Control uses a very elegant
- technique to monitor the status of the left mouse button without the need for
- a Timer.
-
- SPIN.MAK contains an adaptation of Mr. Richter's Spin Button for Visual Basic.
- Since VB offers built in support for using Picture controls I used three
- bitmaps (9 x 22 pixels) for the three possible states of the Spin Button.
- Each bitmap is only 294 bytes. The demo is a simple Color "Maker" App. It
- allows the user to select Red, Green and Blue color values (from 0 to 255)
- and use these to "create" a color. The initial values are set in the mid
- range of each color: 128. The code for monitoring the status of the Spin
- Button can be found in the SpinButton() MouseDown procedure. I tried to add
- comments to the code to ease the understanding of Mr. Richter's technique but
- for the full explanation and an abundance of examples on Programming Windows
- please see:
-
- Windows 3: A Developer's Guide by Jeffrey M. Richter
- M&T Books 501 Galveston Drive Redwood City, CA 94603
- (800) 533-4372 (in California call (800) 356-2002)
- ISBN 1-55851-162-8 (Book only) ISBN 1-55851-164-4 (Book/Disk)
-
- Enjoy,
-
- Costas Kitsos
- CIS 73667,1755
-
- P.S. To ease inquiring minds I am not affiliated with Mr. Richter or M&T Books.